home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 3.8 KB | 144 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWScpPrp.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: © 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWSCPPRP_H
- #define FWSCPPRP_H
-
- #ifndef FWDESC_H
- #include "FWDesc.h"
- #endif
-
- #ifndef FWSCPTBL_H
- #include "FWScptbl.h"
- #endif
-
- #ifndef FWMREFCT_H
- #include "FWMRefCt.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_MScriptable;
-
- //========================================================================================
- // class FW_CPropertyDesignator
- //========================================================================================
-
- class FW_CPropertyDesignator : public FW_MScriptable
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(FW_CPropertyDesignator)
-
- FW_CPropertyDesignator(FW_CPart* part, FW_MScriptable* whichObject, ODDescType whichProperty);
-
- virtual ~FW_CPropertyDesignator();
-
- virtual ODDescType GetObjectClass() const;
-
- virtual ODDescType GetTokenType() const;
-
- virtual ODDescType GetSpecifierForm() const;
-
- // ----- Reference Counting -----
-
- virtual long AcquireScriptable();
-
- virtual long ReleaseScriptable();
-
- // ----- FW_MScriptable Methods -----
-
- virtual FW_Boolean CompareScriptableObjects(Environment* ev,
- FW_CPart* part,
- ODDescType operation,
- const FW_CDesc& other) const;
-
- virtual void BuildObjectSpecifier(Environment* ev,
- FW_CPart* part,
- const FW_CFrame* frame,
- FW_CDesc& specifier,
- ODDescType preferredForm) const;
- // ----- Core Events -----
-
- virtual void DoAEGetData(Environment* ev,
- FW_CPart* part,
- const FW_CAppleEvent& event,
- FW_CAppleEvent& reply);
-
- virtual void DoAESetData(Environment* ev,
- FW_CPart* part,
- const FW_CAppleEvent& event,
- FW_CAppleEvent& reply);
-
- // ----- Token Type -----
-
-
- // ----- Designate Access -----
-
- void GetDesignateValue(Environment* ev, FW_CDesc& propertyValue) const;
- void SetDesignateValue(Environment* ev, FW_CDesc& propertyValue);
- void RestoreDesignateValue(Environment* ev, FW_CDesc& propertyValue);
-
- FW_CFrame* GetDesignateFrame(Environment* ev, FW_CPart* part);
- void GetDesignateInfo(Environment* ev,
- FW_Boolean& canUndo,
- FW_Boolean& causesChange);
-
- void GetDesignateUndoStrings(Environment* ev,
- FW_CPart* part,
- FW_CString& undoString,
- FW_CString& redoString);
-
- // ----- Dependencies -----
-
- virtual void HandlePrimaryDeleted(FW_MScriptable* primary);
-
- // ----- Data Access -----
-
- inline FW_MScriptable* GetSemanticObject() const { return fObject; }
-
- private:
- FW_MScriptable* fObject;
- FW_CPart* fPart;
- ODDescType fWhichProperty;
-
- long fRefCount;
- };
-
- //========================================================================================
- // class FW_CSetPropertyCommand
- //========================================================================================
-
- class FW_CSetPropertyCommand : public FW_CCommand
- {
- public:
- FW_DECLARE_AUTO(FW_CSetPropertyCommand)
-
- FW_CSetPropertyCommand(Environment* ev,
- FW_CFrame* frame,
- FW_Boolean canUndo,
- FW_CPropertyDesignator* propDesignator,
- FW_CDesc& newValue);
-
- virtual ~FW_CSetPropertyCommand();
-
- virtual void DoIt(Environment* ev);
- virtual void UndoIt(Environment* ev);
- virtual void RedoIt(Environment* ev);
-
- protected:
-
- FW_CPropertyDesignator* fPropDesignator;
- FW_CDesc fOldValue;
- FW_CDesc fNewValue;
- };
-
- #endif // FWSCPPRP_H